package ua.epam.java_bravo.data.dao;

import ua.epam.java_bravo.data.dto.HsRenter;
import ua.epam.java_bravo.data.dto.pk.HsRenterPk;
import ua.epam.java_bravo.data.exception.HsRenterDaoException;

public interface HsRenterDao {
    /**
     * Inserts a new row in the HS_Renter table.
     */
    public HsRenterPk insert(HsRenter dto) throws HsRenterDaoException;

    /**
     * Updates a single row in the HS_Renter table.
     */
    public void update(HsRenterPk pk, HsRenter dto) throws HsRenterDaoException;

    /**
     * Deletes a single row in the HS_Renter table.
     */
    public void delete(HsRenterPk pk) throws HsRenterDaoException;

    /**
     * Returns the rows from the HS_Renter table that matches the specified primary-key value.
     */
    public HsRenter findByPrimaryKey(HsRenterPk pk) throws HsRenterDaoException;

    /**
     * Returns all rows from the HS_Renter table that match the criteria 'renter_id = :renterId'.
     */
    public HsRenter findByPrimaryKey(int renterId) throws HsRenterDaoException;

    /**
     * Returns all rows from the HS_Renter table that match the criteria ''.
     */
    public HsRenter[] findAll() throws HsRenterDaoException;

    /**
     * Returns all rows from the HS_Renter table that match the criteria 'address_id = :addressId'.
     */
    public HsRenter[] findByHsAddress(int addressId) throws HsRenterDaoException;

    /**
     * Returns all rows from the HS_Renter table that match the criteria 'renter_id = :renterId'.
     */
    public HsRenter[] findWhereRenterIdEquals(int renterId) throws HsRenterDaoException;

    /**
     * Returns all rows from the HS_Renter table that match the criteria 'firstName = :firstName'.
     */
    public HsRenter[] findWhereFirstNameEquals(String firstName) throws HsRenterDaoException;

    /**
     * Returns all rows from the HS_Renter table that match the criteria 'lastName = :lastName'.
     */
    public HsRenter[] findWhereLastNameEquals(String lastName) throws HsRenterDaoException;

    /**
     * Returns all rows from the HS_Renter table that match the criteria 'address_id = :addressId'.
     */
    public HsRenter[] findWhereAddressIdEquals(int addressId) throws HsRenterDaoException;

    /**
     * Sets the value of maxRows
     */
    public void setMaxRows(int maxRows);

    /**
     * Gets the value of maxRows
     */
    public int getMaxRows();

    /**
     * Returns all rows from the HS_Renter table that match the specified arbitrary SQL statement
     */
    public HsRenter[] findByDynamicSelect(String sql, Object[] sqlParams) throws HsRenterDaoException;

    /**
     * Returns all rows from the HS_Renter table that match the specified arbitrary SQL statement
     */
    public HsRenter[] findByDynamicWhere(String sql, Object[] sqlParams) throws HsRenterDaoException;

}
